import { axios } from '@/utils/request'


export function getCodePage(data) {
    let obj = {
      url: '/vatoutinv/vmsClassifyCode/getCodePage',
      method:'post' ,
    }
    if(data){
      obj.data = data
    }
    return axios(obj)
  }

  export function checkAndSave(data) {
    let obj = {
      url: '/vatoutinv/vmsManualInvoicing/checkAndSave',
      method:'post' ,
    }
    if(data){
      obj.data = data
    }
    return axios(obj)
  }
  export function updateInvoice(data) {
    let obj = {
      url: '/vatoutinv/vmsManualInvoicing/updateInvoice',
      method:'post' ,
    }
    if(data){
      obj.data = data
    }
    return axios(obj)
  }

  export function getDefBIzdictByLxdm(params) {
    return axios({
      url: '/vatoutinv/defBizdict/getDefBIzdictByLxdm',
      method:'get' ,
      params
    })
  }

  export function getCodeDetail(params) {
    return axios({
      url: '/vatoutinv/vmsClassifyCode/getCodeDetail' + '?id=' + params.id + '&newDate=' + new Date().getTime(),
      method:'get' ,
      headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
  }

  export function readExcel(data = {}) {
    return axios({
        url: "/vatoutinv/vmsManualInvoicing/readExcel",
        method:'post',
        data,
        headers: {
            'content-type': 'multipart/form-data',  // 
          },
    })
}


export function getHyListByCode(params) {
    return axios({
      url: '/vatoutinv/vmsClassifyCode/getHyListByCode',
      method:'get' ,
      params
    })
  }


  export function getCodePage2(data) {
    let obj = {
      url: '/vatoutinv/vmsClassifyCode/getCodePage',
      method:'post' ,
    }
    if(data){
      obj.data = data
    }
    return axios(obj)
  }
  export function addCodePage(data) {
    let obj = {
      url: '/vatoutinv/vmsClassifyCode/addCodePage',
      method:'post' ,
    }
    if(data){
      obj.data = data
    }
    return axios(obj)
  }